{% extends "base.html" %}
{% load cache %}

{% block title %}{{ object.name }}の一覧 - {{ current_site.name }}{% endblock %}

{% block content %}
{% cache 300 ing_detail object.name %}
    <p class="p_person">&laquo; <a href="/">トップページ</a></p>

    <div class="div_alpha14">
    <h2 class="h2_alpha02">{{ object.name }}の一覧</h2>
    <div class="div_alpha14_inner">
    
    <ul class="ul02">
        {% for ingredient in object.ingredient_set.all %}
            {% ifnotequal ingredient.contest_set.count 0 %}
            <li><a href="/search?query={{ ingredient.name|iriencode }}">{{ ingredient.name }}</a></li>
            {% endifnotequal %}
        {% endfor %}
    </ul>

    </div>
    </div>
{% endcache %}
{% endblock %}
